/******************************************************************************

	COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2010.

	This file is part of Maxsi Client.

	Maxsi Client is free software: you can redistribute it and/or modify it
	under the terms of the GNU Lesser General Public License as published by
	the Free Software Foundation, either version 3 of the License, or (at your
	option) any later version.

	Maxsi Client is distributed in the hope that it will be useful, but WITHOUT
	ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
	FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
	License for more details.

	You should have received a copy of the GNU Lesser General Public License
	along with Maxsi Client. If not, see <http://www.gnu.org/licenses/>.

	Maxsi Client
	A client UI to the digital distribution platform Maxsi Distribution.

	PageReleaseInfo.h
	The page that asks the user what to install and then loads information
	about it.

******************************************************************************/

#ifndef PageReleaseInfo_H
#define PageReleaseInfo_H

#define MD_RELEASING_STATE_INFO 0
#define MD_RELEASING_STATE_RELEASING 1
#define MD_RELEASING_STATE_FINISHED 1


class PageReleaseInfo : public Page
{
public:
	PageReleaseInfo();
	~PageReleaseInfo();

public:
	MaxsiWindow*	Release;
	MaxsiWindow*	Cancel;
	MaxsiWindow*	ProductNameLabel;
	MaxsiWindow*	ProductNameField;
	MaxsiWindow*	MasterServerLabel;
	MaxsiWindow*	MasterServerField;
	MaxsiWindow*	ContentServerLabel;
	MaxsiWindow*	ContentServerField;
	MaxsiWindow*	MasterPathLabel;
	MaxsiWindow*	MasterPathField;
	MaxsiWindow*	HelpInformation;
	MaxsiWindow*	ProgressScanningFolder;
	MaxsiWindow*	ProgressSHA1;
	MaxsiWindow*	ProgressCompressing;
	MaxsiWindow*	ProgressUploading;
	MaxsiWindow*	ProgressMastering;
	MaxsiWindow*	LabelScanningFolder;
	MaxsiWindow*	LabelSHA1;
	MaxsiWindow*	LabelCompressing;
	MaxsiWindow*	LabelUploading;
	MaxsiWindow*	LabelPleaseWait;
	MaxsiWindow*	LabelMastering;

public:
	int				State;
#if 0
	FileSize_t		TotalFileSize;
	FileSize_t		NumBlocks;
	List			FileList;
	List			FileHashList;
	List			BlockHashList;
	BYTE*			FileListString;
	MaxsiError		ReleaseProduct();
	MaxsiError		ReleaseProductSHA();
	MaxsiError		ReleaseProductUpload();
	MaxsiError		ScanDir(MESTR* AbsPath, MESTR* RelPath);
	MaxsiError		CalculateFileHashes();
	MaxsiError		CalculateFileList();
	MaxsiError		UploadFileList();
	MaxsiError 		UploadBlocks();
	MaxsiError		ThreadSetScanProgress(float Progress, int Type);
	MaxsiError		ThreadSetSHAProgress(float Progress, int Type);
	MaxsiError		ThreadSetCompressProgress(float Progress, int Type);
	MaxsiError		ThreadSetUploadProgress(float Progress, int Type);
	MaxsiError		ThreadSetMasteringProgress(float Progress, int Type);
#endif
	MD_IRelease*	MDRelease;
	MaxsiHandle		ReleaseHandle;

public:
	void			SwitchState(int NewState);

public:	
	virtual MaxsiError CreateControls();
	virtual MaxsiError DeleteControls();
	virtual MaxsiError OnEvent(MaxsiWindowEvent* Event);

};

#endif

